# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Adam Griffiths
# Contributor: Nick B <Shirakawasuna at gmail _dot_ com>
pkgname=nvidia-cg-toolkit
pkgver=3.1
_date="April2012"
pkgrel=6
pkgdesc="NVIDIA Cg libraries"
arch=('loong64' 'x86_64')
url="https://developer.nvidia.com/cg-toolkit"
license=('custom')
depends=('glibc' 'libgl')
source_x86_64=(https://developer.download.nvidia.com/cg/Cg_${pkgver}/Cg-${pkgver}_${_date}_x86_64.tgz)
md5sums_x86_64=('88ba727cdbe0261fac465c4d84f44762')

package() {
  install -Dm755 "${srcdir}"/usr/bin/cgc "${pkgdir}"/usr/bin/cgc
  install -dm755 "${pkgdir}"/usr/include/Cg
  install -m644 "${srcdir}"/usr/include/Cg/* "${pkgdir}"/usr/include/Cg
  install -dm755 "${pkgdir}"/usr/lib
  [ "$CARCH" = "i686" ] && install -m644 "${srcdir}"/usr/lib/* "${pkgdir}"/usr/lib
  [ "$CARCH" = "x86_64" ] && install -m644 "${srcdir}"/usr/lib64/* "${pkgdir}"/usr/lib
  install -Dm644 "${srcdir}"/usr//local/Cg/docs/license.txt "${pkgdir}"/usr/share/licenses/nvidia-cg-toolkit/license.txt
  cp -r "${srcdir}"/usr/local/Cg "${pkgdir}"/usr/share/
  find $pkgdir/usr/share/ -type d -exec chmod -R 755 '{}' ';'
  find $pkgdir/usr/share/ -type f -exec chmod -R 644 '{}' ';'
}

# vim: sw=2:ts=2 et:
